/**
 * 神州信息(2012)
 */
package net.abbp.report.model.headerfooter.io;

import net.abbp.report.model.ReportModel;
import net.abbp.report.model.headerfooter.PageNumHFElement;

import org.dom4j.Element;

/**
 * PageNumHFElement 写入写出
 * 
 * @version 1.0
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since ABBP 1.0
 * 
 *        <pre>
 * 历史：
 *      建立: Jul 29, 2012 lexloo
 * </pre>
 */
public class PageNumHFElementIO extends TextHFElementIO {

    @Override
    public Object read(Element value, ReportModel model) {
        PageNumHFElement textHF = new PageNumHFElement();
        readFromXml(value, textHF);

        return textHF;
    }

    @Override
    public void write(Element element, Object value) {
        PageNumHFElement textHF = (PageNumHFElement) value;

        writeToXml(element, textHF);
    }
}
